using Project.ViewModels;
using Project.Views.Abstractions;
using UnityEngine;
using UnityEngine.EventSystems;

namespace Project.Views
{
    public class SlotUIView : MonoUIViewBase<SlotViewModel>, IDropHandler
    {
        [SerializeField] private ItemUIView _itemView;
        
        public void OnDrop(PointerEventData eventData) => ViewModel.HandleDrop();

        protected override void OnAfterInitialization()
        {
            _itemView.Initialize(ViewModel.ItemViewModel, RootUIView);
        }
    }
}
